{{--图片预览组件--}}
@if (isset($list) && !empty($list))
    <div class="modal fade image-preview-modal {{ $class }}" id="{{ $id }}-modal" data-backdrop="static" tabindex="-1"
         aria-labelledby="{{ $id }}-modal-label" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div id="{{ $id }}ImgShowCaptions" class="carousel slide" data-ride="carousel">
                        <ol class="carousel-indicators">
                            @foreach ($list as $item)
                                <li data-target="#{{ $id }}ImgShowCaptions" data-slide-to="{{$loop->index}}"></li>
                            @endforeach
                        </ol>
                        <div class="carousel-inner">
                            @foreach ($list as $item)
                                <div class="carousel-item">
                                    <img src="{{$item['image_url']??''}}" alt="{{$item['title']}}">
                                    <div class="carousel-caption d-md-block">
                                        <h5>{{$item['title']}}</h5>
                                        @if(isset($item['description']) && !empty($item['description']))
                                            <p>{{$item['description']}}</p>
                                        @endif
                                    </div>
                                </div>
                            @endforeach
                        </div>
                        <button class="carousel-control-prev" type="button" data-target="#{{ $id }}ImgShowCaptions"
                                data-slide="prev">
                            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                            <span class="sr-only">Previous</span>
                        </button>
                        <button class="carousel-control-next" type="button" data-target="#{{ $id }}ImgShowCaptions"
                                data-slide="next">
                            <span class="carousel-control-next-icon" aria-hidden="true"></span>
                            <span class="sr-only">Next</span>
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        showBigImageModal('{{ $id }}');
    </script>
@endif
